package weather_service.weatherprovider.weatherdatamodel;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * The weather Forecast for a List of Days.
 * <p/>
 */
public class Forecast {
  private String lastUpdated;
  private List days = new ArrayList();

  public String getLastUpdated() {
    return lastUpdated;
  }

  public void setLastUpdated(String lastUpdated) {
    this.lastUpdated = lastUpdated;
  }

  public List getDays() {
    return Collections.unmodifiableList(days);
  }

  public void addDay(Day day) {
    days.add(day);
  }

  public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
  }

}

